﻿<UserControl x:Class="Tododoo.Views.AddThingView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:h="clr-namespace:Tododoo.Helpers"
             mc:Ignorable="d">
    <UserControl.InputBindings>
        <KeyBinding Key="Return" Command="{Binding AddNewItemCommand}" />
        <KeyBinding Key="Escape" Command="{Binding CancelCommand}" />
    </UserControl.InputBindings>
    <Grid>
        <Border BorderBrush="#CCCCCC"
                CornerRadius="2"
                BorderThickness="1"
                Background="#FFFFFF"
                Padding="7"
                Margin="10">
            <Border.Effect>
                <DropShadowEffect BlurRadius="10" RenderingBias="Performance" ShadowDepth="0" />
            </Border.Effect>
            <Grid>
                <TextBox Text="{Binding NewItemText, UpdateSourceTrigger=PropertyChanged}"
                         MinWidth="300"
                         FontSize="20"
                         VerticalAlignment="Center"
                         h:FocusEx.FocusOnVisible="True"/>
            </Grid>
        </Border>
    </Grid>
</UserControl>
